package com.shop.api.feign;

import com.shop.Result.LdbzResult;
import com.shop.pojo.LdbzIndexRecommendAd;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = "shop-service-admin")
public interface AdminIndexRecommendAdFeign {

    //修改页面跳转
    @RequestMapping(value = "/admin/indexR/Service/editIndexRecommendAd/{id}",method = RequestMethod.GET)
    LdbzResult editIndexRecommendAd(@RequestParam("id") long id);

    //分页获取首页推荐广告
    @RequestMapping(value = "/admin/indexR/Service/getIndexRecommendAdPage",method = RequestMethod.GET)
    LdbzResult getIndexRecommendAdPage(@RequestParam("entity") LdbzIndexRecommendAd entity, @RequestParam("page")int page, @RequestParam("limit") int limit);

    //获取广告的详细信息
    @RequestMapping(value = "/admin/indexR/Service/selectByKey/{id}",method = RequestMethod.GET)
    LdbzResult selectByKey(@RequestParam("id") long id);

    //修改广告
    @RequestMapping(value = "/admin/indexR/Service/updateByKey",method = RequestMethod.GET)
    LdbzResult updateByKey(@RequestParam("entity") LdbzIndexRecommendAd entity);
}